package cn.hss.object.extend;

/**小孩类
 * @author 作者：HeShaoShuai
 * @Email 邮箱：2569819541@qq.com
 * @Date 日期：2023/4/25 19:42
 * @Package 包名：cn.hss.object.extend
 * @Project 项目名：JavaSE
 * @Version 1.0
 */
public class Kids extends ManKind{
	private int yearsOld;
	public Kids(){
		System.out.println("我子类无参构造器");
	}
	public Kids(int yearsOld){
		this.yearsOld=yearsOld;
	}
	public Kids(int sex,int sal,int yearsOld){
		//super(sex,sal);
		this.yearsOld=yearsOld;
		setSex(sex);
		setSal(sal);
	}

	@Override
	public String employeed() {
		//super.employeed();
		System.out.println("孩子们应该学习而不是工作");
		return " ";
	}

	public void printAge(){
		System.out.println(yearsOld);
	}

	public int getYearsOld() {
		return yearsOld;
	}

	public void setYearsOld(final int yearsOld) {
		this.yearsOld = yearsOld;
	}
}